$(function () {
    //树
    var ay_mssys = [{
        "id": "1",
        "text": "高新区",
        "state": {
            "opened": true,          //展示第一个层级下面的node
        },
        "children": [{
            "id": "21",
            "text": "小学1",
            "children": [{
                "id": "31",
                "text": "校长室",
            }]
        }, {
            "id": "22",
            "text": "小学1",
            "children": [{
                "id": "32",
                "text": "校长室",
            }]
        }, {
            "id": "23",
            "text": "小学1",
            "children": [{
                "id": "33",
                "text": "校长室",
            }, {
                "id": "34",
                "text": "人格权纠纷",
                "children": [{
                    "id": "44",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "54",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "35",
                "text": "人格权纠纷",
                "children": [{
                    "id": "45",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "55",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "36",
                "text": "人格权纠纷",
                "children": [{
                    "id": "46",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "56",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "37",
                "text": "人格权纠纷",
                "children": [{
                    "id": "47",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "57",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "38",
                "text": "人格权纠纷",
                "children": [{
                    "id": "48",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "58",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "39",
                "text": "人格权纠纷",
                "children": [{
                    "id": "49",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "59",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }]
        }]
    }];
    $("#treeview1").jstree({
        'core': {
            'data': ay_mssys,
            'dblclick_toggle': false          //禁用tree的双击展开
        },
        'types': {
            "default": {
                "icon": "fa fa-folder-open"
            },
            "demo": {
                "icon": "fa fa-flash"
            }
        },
        "plugins": ["search", "search", "wholerow", "types"]
    });


    //树
    var ay_mssyss = [{
        "id": "1",
        "text": "基础平台",
        "state": {
            "opened": true,          //展示第一个层级下面的node
        },
        "children": [{
            "id": "21",
            "text": "学校管理",
            "children": [{
                "id": "31",
                "text": "权限1",
            }]
        }, {
            "id": "22",
            "text": "学校管理",
            "children": [{
                "id": "32",
                "text": "权限1",
            }]
        }, {
            "id": "23",
            "text": "学校管理",
            "children": [{
                "id": "33",
                "text": "权限1",
                "children": [{
                    "id": "43",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "53",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "34",
                "text": "学校管理",
                "children": [{
                    "id": "44",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "54",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "35",
                "text": "学校管理",
                "children": [{
                    "id": "45",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "55",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "36",
                "text": "学校管理",
                "children": [{
                    "id": "46",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "56",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "37",
                "text": "人格权纠纷",
                "children": [{
                    "id": "47",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "57",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "38",
                "text": "人格权纠纷",
                "children": [{
                    "id": "48",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "58",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }, {
                "id": "39",
                "text": "人格权纠纷",
                "children": [{
                    "id": "49",
                    "text": "生命权、健康权、身体权纠纷",
                    "children": [{
                        "id": "59",
                        "text": "道路交通事故人身损害赔偿纠纷"
                    }]
                }]
            }]
        }]
    }];
    $("#treeview2").jstree({
        'core': {
            'data': ay_mssyss,
            'dblclick_toggle': false          //禁用tree的双击展开
        },
        'types': {
            "default": {
                "icon": "fa fa-folder-open"
            },
            "demo": {
                "icon": "fa fa-flash"
            }
        },
        "plugins": ["search","checkbox" , "search", "wholerow", "types"]
    });
})